var mainContent = new Vue({
    el:'#mainContent',
    data:{
        // 热门推荐
        hotTop:[],
        // 个性推荐 （没有登录的话，没有）
        specialTop:[],
        logged:false
    },
    methods:{
        init:function () {
            $.get('/user/current',function (user) {
                if (user.number != 'none') {
                    mainContent.logged = true;
                }
                mainContent.getTops();
            });

        },
        getTops:function () {
            $.get('/song/like/tops',function (data) {
                mainContent.hotTop = data['hot'];
                mainContent.specialTop = data['special'];
                console.log(data);
            });
        }
    },
    mounted:function () {
        this.init();
    }
});